package com.mes.system.domain;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

import com.mes.common.core.domain.BaseEntity;
import lombok.Data;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import com.mes.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 租户对象 sys_tenant
 * @author hwg
 * @email hwg
 * @date 2023-03-25
 */
@Data
public class SysTenant extends BaseEntity<SysTenant>
{
    private static final long serialVersionUID = 1L;

    /** 租户名称 */
    @Excel(name = "租户名称")
    @NotBlank(message = "租户名称不允许为空")
    @LogField
    @FieldRemark(name = "租户名称",field = "tenantName")
    private String tenantName;

    /** 负责人 */
    @Excel(name = "负责人")
    @LogField
    @FieldRemark(name = "负责人",field = "leader")
    private String leader;

    /** 联系电话 */
    @Excel(name = "联系电话")
    @LogField
    @FieldRemark(name = "联系电话",field = "phone")
    private String phone;

    /** 地址 */
    @Excel(name = "地址")
    @LogField
    @FieldRemark(name = "地址",field = "address")
    private String address;

    /** 租户状态（0正常 1停用） */
    @Excel(name = "租户状态", dictType = "sys_normal_disable")
    @LogField
    @FieldRemark(name = "租户状态",field = "status")
    private String status;

    public void setTenantName(String tenantName)
    {
        this.tenantName = tenantName;
    }

    public String getTenantName()
    {
        return tenantName;
    }

    public void setLeader(String leader)
    {
        this.leader = leader;
    }

    public String getLeader()
    {
        return leader;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }

    public void setAddress(String address)
    {
        this.address = address;
    }

    public String getAddress()
    {
        return address;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("tenantName", getTenantName())
            .append("leader", getLeader())
            .append("phone", getPhone())
            .append("address", getAddress())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
